package com.example.gesture.Scrollable

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

//vertical and horizontal
@Composable
fun VerticalScrollDemo() {
    Column(
        modifier = Modifier
            .background(Color.LightGray)
            .size(100.dp)
            .verticalScroll(
                state = rememberScrollState()
            )
    ) {
        repeat(10) {
            Text(text = "Item:$it" , modifier = Modifier.padding(2.dp))
        }
    }
}